package org.an.proj.contacts.util;

import android.app.Activity;
import android.view.Window;
import android.view.WindowManager;

/**
 * Created by Fcy on 2016/10/16.<br/>
 */
public class Util {
  public static void translucentWindow(Activity activity, float alpha) {
    Window window = activity.getWindow();
    WindowManager.LayoutParams wl = window.getAttributes();
    wl.flags = WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
    //　这句就是设置窗口里控件的透明度的．0全透明．1不透明．
    wl.alpha = alpha;
    window.setAttributes(wl);
  }
}
